# -*- coding: utf8 -*-
import re
import common
from BeautifulSoup import BeautifulSoup

site_index = 'animesong'
site_keyword = 'animesong'
site_url = 'http://www.jtw.zaq.ne.jp/animesong/'
test_url = 'http://www.jtw.zaq.ne.jp/animesong/ra/rahxephontagen/tune.html'

def get_lyric(url):
    data = common.get_url_content(url)
    data = unicode(data, 'sjis')

    pattern = '<PRE>(.*)</PRE>'

    bool = re.compile(pattern, re.DOTALL).search(data)
    if bool:
        lyric = bool.group(1)
        return lyric

    return None

